package com.example.demo2.controller;

import com.example.demo2.util.TransferPage;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.TextField;
import javafx.stage.Stage;

/**
 * @description This class is for user interaction between users and food selection page
 * @version 2.0
 */

public class FoodController {

    @FXML
    private Button backButton;

    @FXML
    private CheckBox YesButton;

    @FXML
    private CheckBox NoButton;

    @FXML
    private CheckBox NormalFood;

    @FXML
    private CheckBox GoodFoodButton;

    @FXML
    private CheckBox BeefButton;

    @FXML
    private CheckBox SeaFoodButton;

    @FXML
    private CheckBox OtherService;

    @FXML
    private TextField Comment;

    @FXML
    private Button SaveButton;

    //controller
    public void backController(javafx.event.ActionEvent event) {
        Stage primaryStage = (Stage) backButton.getScene().getWindow();
        primaryStage.hide();
        TransferPage.transfer("seat-view", "Seat Selector",613,566);
    }

    public void saveController(ActionEvent event) {
        while (SaveButton.isPressed()) {
            if (YesButton.isSelected()) {

            } else if (NoButton.isSelected()){
                //noButton

            }
            if (NormalFood.isSelected()){

            }else if (GoodFoodButton.isSelected()) {
                if (BeefButton.isSelected()) {}
                if (SeaFoodButton.isSelected()) {}
                if (OtherService.isSelected()) {}
            }

        }
        Stage primaryStage = (Stage) SaveButton.getScene().getWindow();
        primaryStage.hide();
        TransferPage.transfer("print", "Print Info",833,943);

    }
}
